<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>陌</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
        }

        .container {
            max-width: 500px;
            margin: 50px auto;
            padding: 30px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
        }

        .form-group {
            margin-bottom: 20px;
        }

        .label {
            display: block;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        .button {
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            margin: 0 auto;
            display: block;
        }

        .button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>

<form method="post">
    {% csrf_token %}
    <div class="container">
        <h2 style="text-align: center;">修改信息</h2>
        <div class="form-group">
            <label for="name" class="label">姓名:</label>
            <input type="text" name="username" class="input" value="{{username}}" required>
        </div>
        <div class="form-group">
            <label for="email" class="label">年龄:</label>
            <input name="age" class="input" value="{{age}}" required>
        </div>
        <div class="form-group">
            <label for="email" class="label">地址:</label>
            <input name="address" class="input" value="{{address}}" required>
        </div>
        <div class="form-group">
            <label for="name" class="label">成绩:</label>
            <input type="text" name="grade" class="input" value="{{grade}}" required>
        </div>
        <div class="form-group">
            <label for="name" class="label">爱好:</label>
            <input type="checkbox" value="睡觉" name="hobby" {% if "睡觉" in hobby %}checked {% endif %}>睡觉
            <input type="checkbox" value="敲代码" name="hobby" {% if "敲代码" in hobby %}checked {% endif %}>敲代码
            <input type="checkbox" value="打游戏" name="hobby" {% if "打游戏" in hobby %}checked {% endif %}>打游戏
            <input type="checkbox" value="聊天" name="hobby" {% if "聊天" in hobby %}checked {% endif %}>聊天
            <input type="checkbox" value="运动" name="hobby" {% if "运动" in hobby %}checked {% endif %}>运动
        </div>

    </div>

    <button type="submit" class="button">提交</button>
</form>


</body>
</html>